"""
使用函数求特殊a串数列和
"""
def fn(a, b):
   p = 1
   sum1 = 0
   for i in range(b):
       sum1 += p*a
       p = p*10 + 1
   return sum1

a ,b=input().split()
s=fn(int(a),int(b))
print(s)